import gc
import sys

l = []
l.append(l)
# del l
print(sys.getrefcount(l))
print(l)
print(gc.garbage)

gc.set_debug(True)

def f1():
    print(sys.getrefcount(l))


gc.set_threshold(100, 5, 5)
print(gc.get_count())

# while True:
#     f1()
#     print(gc.get_count())
input()